package com.ruoyi.basedata.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basedata.mapper.BdCustomerMapper;
import com.ruoyi.basedata.domain.BdCustomer;
import com.ruoyi.basedata.service.IBdCustomerService;

/**
 * 客户Service业务层处理
 * 
 * @author ptt
 * @date 2023-02-15
 */
@Service
public class BdCustomerServiceImpl implements IBdCustomerService 
{
    @Autowired
    private BdCustomerMapper bdCustomerMapper;

    /**
     * 查询客户
     * 
     * @param id 客户主键
     * @return 客户
     */
    @Override
    public BdCustomer selectBdCustomerById(Long id)
    {
        return bdCustomerMapper.selectBdCustomerById(id);
    }

    /**
     * 查询客户列表
     * 
     * @param bdCustomer 客户
     * @return 客户
     */
    @Override
    public List<BdCustomer> selectBdCustomerList(BdCustomer bdCustomer)
    {
        return bdCustomerMapper.selectBdCustomerList(bdCustomer);
    }

    /**
     * 新增客户
     * 
     * @param bdCustomer 客户
     * @return 结果
     */
    @Override
    public int insertBdCustomer(BdCustomer bdCustomer)
    {
        return bdCustomerMapper.insertBdCustomer(bdCustomer);
    }

    /**
     * 修改客户
     * 
     * @param bdCustomer 客户
     * @return 结果
     */
    @Override
    public int updateBdCustomer(BdCustomer bdCustomer)
    {
        return bdCustomerMapper.updateBdCustomer(bdCustomer);
    }

    /**
     * 批量删除客户
     * 
     * @param ids 需要删除的客户主键
     * @return 结果
     */
    @Override
    public int deleteBdCustomerByIds(Long[] ids)
    {
        return bdCustomerMapper.deleteBdCustomerByIds(ids);
    }

    /**
     * 删除客户信息
     * 
     * @param id 客户主键
     * @return 结果
     */
    @Override
    public int deleteBdCustomerById(Long id)
    {
        return bdCustomerMapper.deleteBdCustomerById(id);
    }
}
